import { onLoad } from "@dcloudio/uni-app";
import { goToBack, showModal } from "../../utils/utils";

export default {
    setup() {
        onLoad(async (option)=>{
            const title=option.title||'';
            if(title===''){
                await showModal({
                    title:`异常提示`,
                    content:`加载错误请重新进入`,
                    showCancel:false
                })
                return goToBack();
            }
            uni.setNavigationBarTitle({
                title
            })
        })
    }
}